basic ideas of digital signal processing

By Arthur Ed LeBouthillier

This article was published in the December 1999 issue of The Robot Builder.

It’s no secret that computers are nearly everywhere. Although it’s not always obvious, they’re already embedded into everything from microwave ovens to toys. They’re inside your car, your radio, your digital camera and your calculator. It seems
that nearly everything made today has a processor in it. However, just as nearly every personal device that needs control or
sequencing has been computerized over the last few decades, it is likely that embedded computers will be used to perform a new kind of processing in the coming decades: the processing of analog signals.

When computers first came out they were applied wherever some kind of sequencing, timing or control operation needed to be performed. That’s why places like your microwave’s timer seems like an obvious place to stick a microprocessor. Turning
things on and off seems like an obvious application of something that “thinks” in terms of on and off (or binary) signals. However, with the advent of cheap digital signal processors (DSP’s), embedded computers are taking on new kinds of roles
which depend on the processing of continuous, time-varying signals themselves. Before the advent of cheap digital signal
processors, these kinds of operations were far too difficult for computers to perform. Analog signals are different from the digital signals that computers use. Digital signals consist of sequences of 1’s and 0’s where there are discrete differences between two levels. Analog signals, however, may vary continuously over a given range. Therefore, whereas a digital signal may consist only of two voltage levels of 0 and 5 volts, an analog signal varies continuously between those limits. Analog signals can take on intermediate values such as 0.1 volts or 0.5 volts or 3 volts. Analog signals are more representative of such things as sound, which can vary smoothly between no sound to very loud sound.

Signal Processing

Let’s concentrate on this idea of signal processing first. Your radio is a signal processor; it takes a signal which is transmitted from a radio transmitter, filters out unwanted signals, amplifies that signal, filters out more unwanted signals and finally amplifies the signal again so that it can drive the speakers. Two of the most obvious kinds of signal processing from this example are amplification and filtering. Amplification increases the value of a signal and filtering removes unwanted kinds of signals.


Mathematically, we can see a signal processor as solely a mathematical function. A signal of one sort goes through a function (a black box) to produce another, more desirable type of signal.

Until recently, this kind of processing of converting one kind of analog signal into another analog signal has been performed directly with circuitry. An engineer’s job was to design the circuitry that performed this signal processing.

Digital Signal Processing

Digital Signal Processing (DSP) seeks to replace formerly analog processing of signals via electronic circuitry with software operations on computer-based processors. DSP’s perform the process of taking an analog signal, doing some kind of
processing on that signal (albeit with a computer) and then outputting some kind of analog signal.

As the figure 2 shows, a DSP takes an analog signal, converts it into a digital signal, operates on that digital representation in the computer and thenoutputs an analog signal through a digital to analog converter. The analog to digital converter takes a
continuously varying signal and converts it to a stream of digital numbers representing the amplitude of the input signal at a given moment. The computer takes this stream of numbers, performs some mathematical functions on it and then outputs a
stream of digital numbers to an digital to analog converter. The digital to analog converter takes the stream of digital numbers and converts them to a continuously varying analog signal. The overall operation is: Analog in, Digital Processing, Analog
Out. The reason that DSP’s are becoming popular for performing the processing of analog signals is that the benefits of digital systems can be brought to the processing of analog signals.

These benefits include easy re-programming, easy enhancements and upgrades, and, in some cases, far superior processing for lower costs.


Basic DSP operations

When we discussed a radio, we said that two of the most important operations were amplifying and filtering. As an example of why DSP’s have become popular, we can understand the process of amplification as merely multiplying the signal by a
factor. Therefore, if the value coming into the analog to digital converter were 0.2 volts and we wanted to amplify the value by 10, all we need do is multiply the number 0.2 by 10 to obtain 2.0. The processor would then output this value to the digital
to analog converter to produce a signal which is 2.0 volts. The other primary operation performed by DSP’s is filtering. Filtering is a process of removing some unwanted frequency component from a signal. A low pass filter passes low frequencies and excludes high frequencies. A high pass filter passes high frequencies and excludes low frequencies. A bandpass filter excludes all high and low frequencies which are not within a narrow band of frequencies. All of these operations can be performed easily with a DSP because they are actually only an averaging process. Although a full understanding of how they
work requires extensive mathematics, the fact is that they are only mathematical functions. Because filters can be understood as mathematical functions, they can be tailored very precisely. DSP’s can create filters which are far superior to Electronic circuit-based filters because their mathematical functions can be more precisely specified. Unlike electronic circuit-based filters, they are not affected by temperature and aging and as computers get faster, a small DSP can perform the function of dozens of filters. In fact, it is possible to use DSP’s to create filters that would be nearly impossible to create using electronic circuitry. An engineer can specify nearly any kind of filtering function and a single DSP can perform what would take hundreds or even thousands of transistors. Because these filters are only programs running on a DSP, they can be changed in a few microseconds and the whole system can be reconfigured to perform some other operation.

Where they’re used

Because of the ability to perform very complicated processing of analog signals, DSP’s have been and will be used in many different places. Filters have already been mentioned, but DSP’s will be used in the next few years in speech understanding systems, voice compression, voice encryption, music compression (MP3), noise elimination, and video processing. They’re used in engine emission control systems in your car and in your cellular phone. They’ll be in high-density television (HDTV) sets.

One area that is receiving a lot of attention lately is that of motor control. Controlling motors optimally using DSP’s is envisioned. By using a DSP to control a motor, it can be made to be extremely efficient. This is because the DSP can tailor its
control over the motor to get the most optimum operation depending on the speed of the motor. This will minimize losses due to heating and will also make motors last longer. Just motor control alone is envisioned as a near-revolutionary area and
it is envisioned that DSP’s will be in virtually every motor in the next few years.

Another area that will utilize DSP’s heavily will be speech recognition products. The basic process of speech recognition relies on being able to identify time-varying frequency trends that form the basic sounds of speech. In order to analyze speech with a computer, the incoming sound must be analyzed in terms of their basic frequencies and how those frequencies are related. This is often done with a process known as determining the spectrum. A spectrum takes a signal and breaks it into the frequency components that form it; it is as if there were a number of filters, one for each frequency. By analyzing trends and relations in the frequency components from these filters, a computer can characterize these basic sounds. By using pattern
matching techniques on these sound elements, the word being spoken can be recognized. Being able to do this requires being able to convert a sound into its spectrum quickly. DSP’s have been optimized to speed up the process of converting a sound into its spectrum.

DSP Optimizations

What makes a DSP different from a regular computer is the fact that its design has been optimized to perform the operations needed in signal processing equations. Multiplication is the first example. DSP’s are designed with fast multiplying circuitry allowing a DSP to perform up to hundreds of times more multiplications in a period of time. They are also optimized so that
repeated operations like multiplying a number by a constant and adding the result to a running sum are a single operations. These kinds of operations are extremely common in signal processing math. Other than these optimizations, though, DSP’s are merely microcomputers which have been optimized to speed up certain kinds of math.

Summary

DSP’s seek to replace the processing of analog signals by software running on a computer. In order to do this, they are optimized to do certain math operations quickly. Because they are becoming cheaper yet they offer superior capabilities in some applications, they are becoming more commonplace in places that were formerly processed with analog circuitry.